<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/jsp/common/common_head.jsp"%>
<!DOCTYPE HTML>
<html>
	<head>
		<title>黄石物流后台管理系统</title>
		<%@ include file="/jsp/common/common_script.jsp"%>
		<script src="${ctx }/js/acquisition/acquisition.js"></script>
		<style type="text/css">
			.datagrid-btable .datagrid-cell a, .datagrid-btable .datagrid-cell a:visited, .datagrid-btable .datagrid-cell a:hover {
				color: #2B2DF2;
			}
			
			#addAcquForm span {
				color: #747474;
			}
			
			#addAcquForm textarea {
				resize:none; 
				width: 275px;
				font-size: 9pt;
			}
		</style>
	</head>
	<body>
		<table id="acquGrid" ></table>
		
		<div id="addAcquDlg" class="easyui-window" closed="true" title="" iconCls="icon-add" style="width:800px; height:500px;text-align:center; background: #fafafa;">
			<div class="easyui-layout" fit="true">
				<div region="center" border="false" style="background:#fff;border:1px solid #ccc;padding-left: 25px;">
					<form id="addAcquForm"  method="post">
						<table border="0" class="queryTable" width="735" height="410" style="margin-bottom: 0px">
							<tr>
								<td class="queryTitle" style="width: 100px;">采集名称：</td>
								<td class="queryContent">
									<input type="hidden" name="acquisitionId"/>
									<input type="hidden" id="submitType" />
									<input type="text" id="acqName" name="acqName" class="inputText easyui-validatebox" required="true" validType="maxLength[25]" maxlength="25" style="width: 195px;"/>
								</td>
								
								<td class="queryTitle" style="width: 100px;">入库信息：</td>
								<td class="queryContent">
									<select id="categoryId" name="categoryId" class="easyui-combobox" style="width: 260px;" panelHeight="auto" editable="false" required="true">
									</select>
								</td>
							</tr>
							<tr>
								<td class="queryTitle">页面编码：</td>
								<td class="queryContent">
									<input type="text" id="pageEncoding" name="pageEncoding" class="inputText easyui-validatebox" required="true" validType="maxLength[10]" maxlength="10" value="GBK" style="width: 95px;"/>
									<span>GBK或UTF-8编码</span>
								</td>
								
								<td class="queryTitle">暂停时间：</td>
								<td class="queryContent">
									<input type="text" id="pauseTime" name="pauseTime" class="inputText easyui-numberbox" required="true" validType="maxLength[10]" maxlength="10" style="width: 65px;"/>
									<span>每采集一篇文章暂停时间,单位(毫秒)</span>
								</td>
							</tr>
							
							<tr>
								<td class="queryTitle">采集地址：</td>
								<td class="queryContent" colspan="3">
									<input type="text" id="planList" name="planList" class="inputText easyui-validatebox" data-options="required:true,validType:'url'" maxlength="1000" style="width: 510px;"/>
									<span>以http://开头</span>
								</td>
							</tr>
							
							<tr>
								<td class="queryTitle">动态地址：</td>
								<td class="queryContent" colspan="3">
									<input type="text" id="dynamicAddr" name="dynamicAddr" class="inputText easyui-validatebox" maxlength="1000" style="width: 388px;" data-options="validType:'dyna_url'"/>
									<span>以http://开头,分页变量用[page]代替</span>
									<br/>
									页码&nbsp;&nbsp;从
									<input type="text" id="dynamicStart" name="dynamicStart" class="inputText easyui-numberbox" validType="maxLength[10]" maxlength="10" style="width: 70px;"/>
									到
									<input type="text" id="dynamicEnd" name="dynamicEnd" class="inputText easyui-numberbox" validType="maxLength[10]" maxlength="10" style="width: 70px;"/>
								</td>
							</tr>
							
							<tr>
								<td class="queryTitle" style="height: 110px; width: 110px;">
									内容地址集策略：									
									<select id="linksetType" name="linksetType" style="width: 109px;" class="easyui-combobox" panelHeight="auto" editable="false">
										<option value="1" selected="selected">jQuery ID选择器</option>
										<option value="2">jQuery 类选择器</option>
										<option value="3">边界截取</option>
									</select>
								</td>
								<td class="queryContent" colspan="3">
									<div id="set_plot_1">
										<div style="display: inline; float: left;">
											<span>选择器</span> <br/>
											<textarea id="linksetSelector" name="linksetSelector" rows="3" class="easyui-validatebox" validType="maxLength[255]" maxlength="255" required="true"></textarea>
										</div>
										
										<div style="display: inline; float: right;">
											<span>索引(仅当类选择器时有效)</span> <br/>
											<textarea id="linksetIndex" name="linksetIndex" rows="3" class="easyui-validatebox easyui-numberbox" validType="maxLength[255]" maxlength="255"></textarea>
										</div>
									</div>									
									
									<div id="set_plot_3" style="display: none;">
										<div style="display: inline; float: left;">
											<span>开始HTML</span> <br/>
											<textarea id="linksetStart" name="linksetStart" rows="3" class="easyui-validatebox" validType="maxLength[255]" maxlength="255" required="true"></textarea>
										</div>
										
										<div style="display: inline; float: right;">
											<span>结束HTML</span> <br/>
											<textarea id="linksetEnd" name="linksetEnd" rows="3" class="easyui-validatebox" validType="maxLength[255]" maxlength="255" required="true"></textarea>
										</div>
									</div>
								</td>
							</tr>
							
							<tr>
								<td class="queryTitle">
									内容策略：
									<select id="contentType" name="contentType" style="width: 109px;" class="easyui-combobox" panelHeight="auto" editable="false">
										<option value="1" selected="selected">jQuery ID选择器</option>
										<option value="2">jQuery 类选择器</option>
										<option value="3">边界截取</option>
									</select>
								</td>
								<td class="queryContent" colspan="3">
									<div id="content_plot_1">
										<div style="display: inline; float: left;">
											<span>选择器</span> <br/>
											<textarea id="contentSelector" name="contentSelector" rows="3" class="easyui-validatebox" validType="maxLength[255]" maxlength="255" required="true"></textarea>
										</div>
										
										<div style="display: inline; float: right;">
											<span>索引(仅当类选择器时有效)</span> <br/>
											<textarea id="contentIndex" name="contentIndex" rows="3" class="easyui-validatebox easyui-numberbox" validType="maxLength[255]" maxlength="255"></textarea>
										</div>
									</div>								
									
									<div id="content_plot_3" style="display: none;">
										<div style="display: inline; float: left;">
											<span>开始HTML</span> <br/>
											<textarea id="contentStart" name="contentStart" rows="3" class="easyui-validatebox" validType="maxLength[255]" maxlength="255" required="true"></textarea>
										</div>
										
										<div style="display: inline; float: right;">
											<span>结束HTML</span> <br/>
											<textarea id="contentEnd" name="contentEnd" rows="3" class="easyui-validatebox" validType="maxLength[255]" maxlength="255" required="true"></textarea>
										</div>
									</div>
								</td>
							</tr>
						</table>
					</form>
				</div>
				<div region="south" border="false" style="text-align:center;height:30px;line-height:30px;">
					<a class="easyui-linkbutton" iconCls="icon-ok" href="javascript:void(0)" onclick="doPostData()">确定</a>
					<a class="easyui-linkbutton" iconCls="icon-cancel" href="javascript:void(0)" onclick="closeWindow()">取消</a>
				</div>
			</div>
		</div>
	</body>
</html>
